#include "IM_Core_Slots.h"
#include <QDebug>
#include <iostream>
#include <future>
#include <unistd.h>
#include "Control/LoginControl.h"
using namespace IM_GUI_KIT;
void IM_Core_Slots::doLogin(QString user, QString password, void *userData)
{
  //  std::future<void> a=std::async(std::launch::async,[](LoginControl *login,QString user, QString password){
  LoginControl *login=(LoginControl*)userData;
  qDebug()<<"sleep";
  sleep(2);
  qDebug()<<"sleep ,,,end ";
  if(user.isEmpty()){
      emit login->loginSuccess();
    }else {
      emit login->loginError();
    }
  //    },userData,user ,password);
}

IM_Core_Slots::IM_Core_Slots(QObject *parent):QObject (parent)
{
qDebug()<<"initIM_Core_Slots ";
}
